#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

vector<string> words;
string sortc(string word) {
  string t;
  for (char c : word) t.push_back(tolower(c));
  sort(t.begin(), t.end());
  return t;
}
void solve() {
  map<string, vector<string>> mp;
  for (string word : words) {
    string x = sortc(word);
    mp[x].push_back(word);
  }
  set<string> st;
  for (const auto& p : mp) {
    if (p.second.size() > 1) continue;
    st.insert(p.second.front());
  }
  for (const auto& s : st) cout << s << endl;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s;
  while (cin >> s && s != "#") words.push_back(s);
  solve();
  return 0;
}